![]() |
Kinetis SDK API Reference Manual
1.0.0-beta
Freescale Semiconductor, Inc.
|
#include <assert.h>#include <stdint.h>#include <stdbool.h>#include "fsl_uart_features.h"#include "fsl_device_registers.h"Data Structures | |
| struct | uart_idle_line_config_t |
| Structure for idle line configuration settings. More... | |
| struct | uart_status_flag_all_t |
| Structure for all UART status flags. More... | |
| struct | uart_interrupt_config_t |
| UART interrupt configuration structure, default settings are 0 (disabled). More... | |
| struct | uart_config_t |
| UART configuration structure. More... | |
Functions | |
UART Common Configurations | |
| uart_status_t | uart_hal_init (uint32_t uartInstance, const uart_config_t *config) |
| Initialize the UART controller. More... | |
| uart_status_t | uart_hal_set_baud_rate (uint32_t uartInstance, uint32_t sourceClockInHz, uint32_t desiredBaudRate) |
| Configure the UART baud rate. More... | |
| uart_status_t | uart_hal_set_baud_rate_divisor (uint32_t uartInstance, uint32_t baudRateDivisor) |
| Set the UART baud rate modulo divisor value. More... | |
| uart_status_t | uart_hal_configure_bit_count_per_char (uint32_t uartInstance, uart_bit_count_per_char_t bitCountPerChar) |
| Configure number of bits per character in the UART controller. More... | |
| void | uart_hal_configure_parity_mode (uint32_t uartInstance, uart_parity_mode_t parityModeType) |
| Configure the parity mode in the UART controller. More... | |
| uart_status_t | uart_hal_configure_stop_bit_count (uint32_t uartInstance, uart_stop_bit_count_t stopBitCount) |
| Configure the number of stop bits in the UART controller. More... | |
| void | uart_hal_configure_tx_rx_inversion (uint32_t uartInstance, uint32_t rxInvert, uint32_t txInvert) |
| Configure the transmit and receive inversion control in UART controller. More... | |
| void | uart_hal_enable_transmitter (uint32_t uartInstance) |
| Enable the UART transmitter. More... | |
| void | uart_hal_disable_transmitter (uint32_t uartInstance) |
| Disable the UART transmitter. More... | |
| bool | uart_hal_is_transmitter_enabled (uint32_t uartInstance) |
| Get the UART transmitter enabled/disabled configuration setting. More... | |
| void | uart_hal_enable_receiver (uint32_t uartInstance) |
| Enable the UART receiver. More... | |
| void | uart_hal_disable_receiver (uint32_t uartInstance) |
| Disable the UART receiver. More... | |
| bool | uart_hal_is_receiver_enabled (uint32_t uartInstance) |
| Get the UART receiver enabled/disabled configuration setting. More... | |
UART Interrupts and DMA | |
| void | uart_hal_configure_interrupts (uint32_t uartInstance, const uart_interrupt_config_t *interruptConfig) |
| Configure the UART module interrupts to enable/disable various interrupt sources. More... | |
| void | uart_hal_enable_break_detect_interrupt (uint32_t uartInstance) |
| Enable the break_detect_interrupt. More... | |
| void | uart_hal_disable_break_detect_interrupt (uint32_t uartInstance) |
| Disable the break_detect_interrupt. More... | |
| bool | uart_hal_is_break_detect_interrupt_enabled (uint32_t uartInstance) |
| Get the configuration of the break_detect_interrupt enable setting. More... | |
| void | uart_hal_enable_rx_active_edge_interrupt (uint32_t uartInstance) |
| Enable the rx_active_edge_interrupt. More... | |
| void | uart_hal_disable_rx_active_edge_interrupt (uint32_t uartInstance) |
| Disable the rx_active_edge_interrupt. More... | |
| bool | uart_hal_is_rx_active_edge_interrupt_enabled (uint32_t uartInstance) |
| Get the configuration of the rx_active_edge_interrupt enable setting. More... | |
| void | uart_hal_enable_tx_data_register_empty_interrupt (uint32_t uartInstance) |
| Enable the tx_data_register_empty_interrupt. More... | |
| void | uart_hal_disable_tx_data_register_empty_interrupt (uint32_t uartInstance) |
| Disable the tx_data_register_empty_interrupt. More... | |
| bool | uart_hal_is_tx_data_register_empty_interrupt_enabled (uint32_t uartInstance) |
| Get the configuration of the tx_data_register_empty_interrupt enable setting. More... | |
| void | uart_hal_enable_transmission_complete_interrupt (uint32_t uartInstance) |
| Enable the transmission_complete_interrupt. More... | |
| void | uart_hal_disable_transmission_complete_interrupt (uint32_t uartInstance) |
| Disable the transmission_complete_interrupt. More... | |
| bool | uart_hal_is_transmission_complete_interrupt_enabled (uint32_t uartInstance) |
| Get the configuration of the transmission_complete_interrupt enable setting. More... | |
| void | uart_hal_enable_rx_data_register_full_interrupt (uint32_t uartInstance) |
| Enable the rx_data_register_full_interrupt. More... | |
| void | uart_hal_disable_rx_data_register_full_interrupt (uint32_t uartInstance) |
| Disable the rx_data_register_full_interrupt. More... | |
| bool | uart_hal_is_receive_data_full_interrupt_enabled (uint32_t uartInstance) |
| Get the configuration of the rx_data_register_full_interrupt enable setting. More... | |
| void | uart_hal_enable_idle_line_interrupt (uint32_t uartInstance) |
| Enable the idle_line_interrupt. More... | |
| void | uart_hal_disable_idle_line_interrupt (uint32_t uartInstance) |
| Disable the idle_line_interrupt. More... | |
| bool | uart_hal_is_idle_line_interrupt_enabled (uint32_t uartInstance) |
| Get the configuration of the idle_line_interrupt enable setting. More... | |
| void | uart_hal_enable_rx_overrun_interrupt (uint32_t uartInstance) |
| Enable the rx_overrun_interrupt. More... | |
| void | uart_hal_disable_rx_overrun_interrupt (uint32_t uartInstance) |
| Disable the rx_overrun_interrupt. More... | |
| bool | uart_hal_is_rx_overrun_interrupt_enabled (uint32_t uartInstance) |
| Get the configuration of the rx_overrun_interrupt enable setting. More... | |
| void | uart_hal_enable_noise_error_interrupt (uint32_t uartInstance) |
| Enable the noise_error_interrupt. More... | |
| void | uart_hal_disable_noise_error_interrupt (uint32_t uartInstance) |
| Disable the noise_error_interrupt. More... | |
| bool | uart_hal_is_noise_error_interrupt_enabled (uint32_t uartInstance) |
| Get the configuration of the noise_error_interrupt enable setting. More... | |
| void | uart_hal_enable_framing_error_interrupt (uint32_t uartInstance) |
| Enable the framing_error_interrupt. More... | |
| void | uart_hal_disable_framing_error_interrupt (uint32_t uartInstance) |
| Disable the framing_error_interrupt. More... | |
| bool | uart_hal_is_framing_error_interrupt_enabled (uint32_t uartInstance) |
| Get the configuration of the framing_error_interrupt enable setting. More... | |
| void | uart_hal_enable_parity_error_interrupt (uint32_t uartInstance) |
| Enable the parity_error_interrupt. More... | |
| void | uart_hal_disable_parity_error_interrupt (uint32_t uartInstance) |
| Disable the parity_error_interrupt. More... | |
| bool | uart_hal_is_parity_error_interrupt_enabled (uint32_t uartInstance) |
| Get the configuration of the parity_error_interrupt enable setting. More... | |
| void | uart_hal_configure_dma (uint32_t uartInstance, bool txDmaConfig, bool rxDmaConfig) |
| Configure the UART DMA requests for the Transmitter and Receiver. More... | |
| bool | uart_hal_is_txdma_enabled (uint32_t uartInstance) |
| Get the UART Transmit DMA request configuration setting. More... | |
| bool | uart_hal_is_rxdma_enabled (uint32_t uartInstance) |
| Get the UART Receive DMA request configuration setting. More... | |
UART Transfer Functions | |
| void | uart_hal_putchar (uint32_t uartInstance, uint8_t data) |
| This function allows the user to send an 8-bit character from the UART data register. More... | |
| void | uart_hal_putchar9 (uint32_t uartInstance, uint16_t data) |
| This function allows the user to send a 9-bit character from the UART data register. More... | |
| uart_status_t | uart_hal_putchar10 (uint32_t uartInstance, uint16_t data) |
| This function allows the user to send a 10-bit character from the UART data register. More... | |
| void | uart_hal_getchar (uint32_t uartInstance, uint8_t *readData) |
| This function gets a received 8-bit character from the UART data register. More... | |
| void | uart_hal_getchar9 (uint32_t uartInstance, uint16_t *readData) |
| This function gets a received 9-bit character from the UART data register. More... | |
| uart_status_t | uart_hal_getchar10 (uint32_t uartInstance, uint16_t *readData) |
| This function gets a received 10-bit character from the UART data register. More... | |
UART Special Feature Configurations | |
| void | uart_hal_configure_wait_mode_operation (uint32_t uartInstance, uart_operation_config_t mode) |
| Configure the UART to either operate or cease to operate in WAIT mode. More... | |
| uart_operation_config_t | uart_hal_get_wait_mode_operation_config (uint32_t uartInstance) |
| Determine if the UART operates or ceases to operate in WAIT mode. More... | |
| void | uart_hal_configure_loopback_mode (uint32_t uartInstance, bool enable) |
| Configure the UART loopback operation. More... | |
| void | uart_hal_configure_singlewire_mode (uint32_t uartInstance, bool enable) |
| Configure the UART single-wire operation. More... | |
| void | uart_hal_configure_txdir_in_singlewire_mode (uint32_t uartInstance, uart_singlewire_txdir_t direction) |
| Configure the UART transmit direction while in single-wire mode. More... | |
| uart_status_t | uart_hal_put_receiver_in_standby_mode (uint32_t uartInstance) |
| Place the UART receiver in standby mode. More... | |
| void | uart_hal_put_receiver_in_normal_mode (uint32_t uartInstance) |
| Place the UART receiver in normal mode (disable standby mode operation). More... | |
| bool | uart_hal_is_receiver_in_standby (uint32_t uartInstance) |
| Determine if the UART receiver is currently in standby mode. More... | |
| void | uart_hal_select_receiver_wakeup_method (uint32_t uartInstance, uart_wakeup_method_t method) |
| Select the UART receiver wakeup method (idle-line or address-mark) from standby mode. More... | |
| uart_wakeup_method_t | uart_hal_get_receiver_wakeup_method (uint32_t uartInstance) |
| Get the UART receiver wakeup method (idle-line or address-mark) from standby mode. More... | |
| void | uart_hal_configure_idle_line_detect (uint32_t uartInstance, const uart_idle_line_config_t *config) |
| Configure the operation options of the UART idle line detect. More... | |
| void | uart_hal_set_break_char_transmit_length (uint32_t uartInstance, uart_break_char_length_t length) |
| Configure the UART break character transmit length. More... | |
| void | uart_hal_set_break_char_detect_length (uint32_t uartInstance, uart_break_char_length_t length) |
| Configure the UART break character detect length. More... | |
| void | uart_hal_queue_break_char_to_send (uint32_t uartInstance, bool enable) |
| Configure the UART transmit send break character operation. More... | |
| uart_status_t | uart_hal_configure_match_address_operation (uint32_t uartInstance, bool matchAddrMode1, bool matchAddrMode2, uint8_t matchAddrValue1, uint8_t matchAddrValue2) |
| Configure the UART match address mode control operation. More... | |
| uart_status_t | uart_hal_configure_send_msb_first_operation (uint32_t uartInstance, bool enable) |
| Configure the UART to send data MSB first (Note: Feature available on select UART instances) More... | |
| uart_status_t | uart_hal_configure_receive_resync_disable_operation (uint32_t uartInstance, bool enable) |
| Configuration option to disable the UART resynchronization during received data. More... | |
UART Status Flags | |
| void | uart_hal_get_all_status_flag (uint32_t uartInstance, uart_status_flag_all_t *allStatusFlag) |
| Get all of the UART status flag states. More... | |
| bool | uart_hal_is_transmit_data_register_empty (uint32_t uartInstance) |
| Get the UART Transmit data register empty flag. More... | |
| bool | uart_hal_is_transmission_complete (uint32_t uartInstance) |
| Get the UART Transmission complete flag. More... | |
| bool | uart_hal_is_receive_data_register_full (uint32_t uartInstance) |
| Get the UART Receive data register full flag. More... | |
| bool | uart_hal_is_idle_line_detected (uint32_t uartInstance) |
| Get the UART Idle-line detect flag. More... | |
| bool | uart_hal_is_receive_overrun_detected (uint32_t uartInstance) |
| Get the UART Receiver Overrun status flag. More... | |
| bool | uart_hal_is_noise_detected (uint32_t uartInstance) |
| Get the UART noise status flag. More... | |
| bool | uart_hal_is_frame_error_detected (uint32_t uartInstance) |
| Get the UART Frame error status flag. More... | |
| bool | uart_hal_is_parity_error_detected (uint32_t uartInstance) |
| Get the UART parity error status flag. More... | |
| bool | uart_hal_is_line_break_detected (uint32_t uartInstance) |
| Get the UART LIN break detect interrupt status flag. More... | |
| bool | uart_hal_is_receive_active_edge_detected (uint32_t uartInstance) |
| Get the UART Receive pin active edge interrupt status flag. More... | |
| bool | uart_hal_is_receiver_active (uint32_t uartInstance) |
| Get the UART Receiver Active Flag (RAF) state. More... | |
| uart_status_t | uart_hal_clear_status_flag (uint32_t uartInstance, uart_status_flag_t statusFlag) |
| Clear an individual and specific UART status flag. More... | |
| void | uart_hal_clear_all_non_autoclear_status_flags (uint32_t uartInstance) |
| Clear ALL of the UART status flags. More... | |